<!--#include file="..\RootContent.inc"-->
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<BODY bgcolor=#F8F9D9 style="font-family:Times new roman">
<%
	'create thu muc noidung
	Set bDir=server.CreateObject("ActiveFile.Directory")
    bPathNam=RootBackup & "NOIDUNG"
	bDir.Path=bPathNam
    if not bDir.Exists() then
	   	call bDir.Create(bPathNam)
	end if	
	Set bDir=nothing
	'create thu muc con trong thu muc noidung
	Set Dir = Server.CreateObject("ActiveFile.Directory")
	Dir.Path = RootContent
	For Each fileObj in Dir.Files
		If fileObj.IsDirectory Then
			set bCreateDir=Server.CreateObject("ActiveFile.Directory")
			bCreateDir.Path=RootBackup & "NOIDUNG\" & fileObj.FileName
		    if not bCreateDir.Exists() then
	   			call bCreateDir.Create(RootBackup & "\NOIDUNG\" & fileObj.FileName)
			end if
			Set bCreateDir=nothing
		End If
	Next
	Set Dir=Nothing
	'tao thu muc con trong thu muc data
	set bCreateDir=Server.CreateObject("ActiveFile.Directory")
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\XULY"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\XULY")
	end if
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\XULY\TEXT"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\XULY\TEXT")
	end if
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\YEUCAU"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\YEUCAU")
	end if
	bCreateDir.Path=RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT"
    if not bCreateDir.Exists() then
		call bCreateDir.Create(RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT")
	end if
	Set bCreateDir=nothing
	'copy file trong thu muc data
	set bCopyfile=Server.CreateObject("ActiveFile.Directory")
	bCopyfile.Path=RootContent & "DATA\XULY"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\XULY\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\XULY\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\XULY\" & fileObj.FileName)
				end if
				Set bfile=nothing
			end if
		Next
	bCopyfile.Path=RootContent & "DATA\XULY\TEXT"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\XULY\TEXT\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\XULY\TEXT\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\XULY\TEXT\" & fileObj.FileName)
				end if
				Set bfile=nothing
			end if
		Next
	bCopyfile.Path=RootContent & "DATA\YEUCAU\TEXT"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\YEUCAU\TEXT\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\YEUCAU\TEXT\" & fileObj.FileName)
				end if
				Set bfile=nothing
			end if
		Next
	bCopyfile.Path=RootContent & "DATA\YEUCAU"
		For Each fileObj in bCopyfile.Files
			If not fileObj.IsDirectory Then	
				set bfile=Server.CreateObject("ActiveFile.File")
				bfile.Name=RootBackup & "NOIDUNG\DATA\YEUCAU\" & fileObj.FileName
				if not bfile.Exists() then
					bfile.Name=RootContent & "DATA\YEUCAU\" & fileObj.FileName
					bfile.Copy(RootBackup & "NOIDUNG\DATA\YEUCAU\" & fileObj.FileName)
				end if
				Set bfile=nothing
			end if
		Next
	set bCopyfile=Nothing
	' tao thu muc con trong thu muc giao ban
	Set Dir = Server.CreateObject("ActiveFile.Directory")
	Dir.Path = RootContent & "GIAOBAN\"
	For Each fileObj in Dir.Files
		If fileObj.IsDirectory Then
			set bCreateDir=Server.CreateObject("ActiveFile.Directory")
			bCreateDir.Path=RootBackup & "NOIDUNG\GIAOBAN\" & fileObj.FileName
		    if not bCreateDir.Exists() then
	   			call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName)
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\NAM\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\QUY\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\THANG\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\GIAOBAN\" & fileObj.FileName & "\TUAN\")
			end if
			Set bCreateDir=nothing
		End If
	Next
	Set Dir=Nothing
	'Copy file trong thu muc giaoban
	set bCopyfile=Server.CreateObject("ActiveFile.Directory")
	bCopyfile.Path=RootContent & "GIAOBAN\"
		For Each fileObjfolder in bCopyfile.Files
			If fileObjfolder.IsDirectory Then	
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\NAM\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\NAM\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\QUY\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\QUY\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\THANG\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\THANG\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\TUAN\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\GIAOBAN\" & fileObjfolder.FileName & "\TUAN\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
			end if
		Next
	set bCopyfile=nothing
	' tao thu muc con trong thu muc Upload
	Set Dir = Server.CreateObject("ActiveFile.Directory")
	Dir.Path = RootContent & "UPLOAD\"
	For Each fileObj in Dir.Files
		If fileObj.IsDirectory Then
			set bCreateDir=Server.CreateObject("ActiveFile.Directory")
			bCreateDir.Path=RootBackup & "NOIDUNG\UPLOAD\" & fileObj.FileName
		    if not bCreateDir.Exists() then
	   			call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName)
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DEN\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DEN\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DI\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DI\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DUTHAO\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\DUTHAO\TEXT")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\NOIBO\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\NOIBO\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\QUYETDINH\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\QUYETDINH\TEXT\")
				call bCreateDir.Create(RootBackup & "\NOIDUNG\UPLOAD\" & fileObj.FileName & "\TOTRINH\")
			end if
			Set bCreateDir=nothing
		End If
	Next
	Set Dir=Nothing
	'Copy file trong thu muc Upload
	set bCopyfile=Server.CreateObject("ActiveFile.Directory")
	bCopyfile.Path=RootContent & "UPLOAD\"
		For Each fileObjfolder in bCopyfile.Files
			If fileObjfolder.IsDirectory Then	
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DEN\TEXT\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DI\TEXT\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\DUTHAO\TEXT\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\NOIBO\TEXT\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\QUYETDINH\TEXT\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
				Set bcopyfilechild=Server.CreateObject("ActiveFile.Directory")
				bcopyfilechild.Path=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\"
				For Each fileObj in bcopyfilechild.Files
					If not fileObj.IsDirectory Then
						set bfile=Server.CreateObject("ActiveFile.File")
						bfile.Name=RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
						if not bfile.Exists() then
							bfile.Name=RootContent & "UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName
							bfile.Copy(RootBackup & "NOIDUNG\UPLOAD\" & fileObjfolder.FileName & "\TOTRINH\" & fileObj.FileName)
						end if
						Set bfile=nothing
					end if
				Next
				Set bcopyfilechild=Nothing
			end if
		Next
	set bCopyfile=nothing
	response.write("Backup da hoan thanh")
%>
</BODY>
</HTML>